home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 24
/
Aminet 24 (1998)(GTI - Schatztruhe)[!][Apr 1998].iso
/
Aminet
/
biz
/
swood
/
FW_MEf_eng.lha
/
FW_MEf-e
/
MPaste.fw.long
< prev
next >
Wrap
Text File
|
1998-01-28
|
5KB
|
216 lines
/* ============================================ */
/* This macro will duplicate any selected */
/* graphic objects. (group or ungroup) */
/* by Heiko Schröder (Age) */
/* $VER: Multiple Paste 1.65 (01/28/98) */
/* ============================================ */
R='0A'X
Dre=0
Sei=0
Address='FinalW'
Options results
STATUS PORTNAME
FW = result
address(FW)
SIGNAL ON BREAK_C
SIGNAL ON SYNTAX
'ShowMessage 1 0 "Multiple Paste V1.65 - 01/28/98" "© Heiko Schroeder" "E-Mail: age@thepentagon.com" "Okay" "Cancel" ""'
If result=2 then Exit
GetDocItemPrefs Decimal
Punkt=Result
If Punkt="Comma" then DocItemPrefs Decimal Period
GraphicTool
nr=1
CurrentObject
ObjectId = Result
IF ObjectId=0 THEN do
'ShowMessage 1 1 "Macro: Multiple Paste" "No graphical object selected..." "" "Abort" "" ""'
Call BREAK_C
End
/*Kontrolle ob ein oder mehrere Objekte ausgewählt sind*/
Objekt.0=nr; Objekt.nr=ObjectID
FirstObject Selected
ID=result
Call Zaehlen
Do While 1
NextObject ID Selected
ID=result
If ID=0 then Leave
Call Zaehlen
End
If Objekt.0=1 then do
gruppe=false
end
else gruppe=true
Do a=2 to Objekt.0
SelectObject Objekt.a MULTIPLE
End
SelectObject Objekt.1 MULTIPLE
/*Ende der Kontrolle*/
STATUS View
Zoom=result
STATUS Pages
Seiten=result
STATUS Page
Seite=result
If Gruppe=true then Group
Copy
IF RC=0 THEN do
CurrentObject
ObjectID=result
GetObjectCoords ObjectID
Parse var result Seite x y w h
wl=w
hl=h
GetObjectRotation ObjectID
Dreh=result
GetObjectType ObjectID
Typ=result
If Gruppe=true then Ungroup
'ShowMessage 2 0 "Screen output?" "" "" "normal" "fast" ""'
ba=result
Do While 1
Result="ß"
RequestText '"Multiple Paste" "Number of copies" ""'
Anzahl=Result
If Anzahl="ß" then call BREAK_C
If Anzahl=""|Anzahl=0 then call Ende
If Datatype(Anzahl,'W')=1 then leave
else call oops
End
Do while 1
Result="ß"
RequestText '"Multiple Paste" "Horizontal displacement:" ""'
Hor=Result
If Hor="ß" then call BREAK_C
If Hor="" then Hor=0
If Datatype(Hor,'N')=1 then leave
else call oops1
End
Do while 1
Result="ß"
RequestText '"Multiple Paste" "Vertical displacement:" ""'
Ver=Result
If Ver="ß" then call BREAK_C
If Ver="" then Ver=0
If Datatype(Ver,'N')=1 then leave
else call oops1
End
Do while 1
Result="ß"
RequestText '"Multiple Paste" "Rotation:" ""'
Dre=Result
If Dre="ß" then call BREAK_C
If Dre="" then Dre=0
If Datatype(Dre,'W')=1 then leave
else call oops
End
Do While 1
Result="ß"
RequestText '"Multiple Paste" "On which page? 0=selected page" ""'
Sei=Result
If Sei="ß" then call BREAK_C
If Sei=""|Sei=0 then Sei=Seite
If Datatype(Sei,'W')=1 then leave
else call oops
End
If ba=2 then View 400
Do a=1 to (Sei-Seiten)
InsertPageBreak
End
Do i=1 TO Anzahl
Paste
CurrentObject
ObjectID=Result
a=x+(Hor*i)
b=y+(Ver*i)
Winkel=Dreh+Dre*i
If Typ=2|Typ=3 then do /*Linien*/
GetPageSetup HEIGHT
Pagehoehe=result
w=wl+(Hor*i)
h=hl+(Ver*i)
If Sei~=1 then h=h+(sei-1)*Pagehoehe
End
SetObjectCoords ObjectID Sei a b w h /*Probleme bei Linien*/
SetObjectRotation ObjectID Winkel
If Gruppe=true then Ungroup
End
End
If Sei~=Seite then GotoPage Sei
Call WH
Redraw
'ShowMessage 2 1 "Thanks for using." "© Heiko Schröder" "http://yi.com/home/SchroederHeiko" "Click" "" ""'
Exit
ENDE:
Call WH
'ShowMessage 1 1 "Incorrect number of copies..." "" "" "Abort" "" ""'
EXIT
SYNTAX:
Call WH
'ShowMessage 1 1 "There was an error." "Error-identification you can find in »Ram:Error«" "" "Okay" "" ""'
address "REXX"
Open("F","Ram:Error","W")
write ("F", "ATTENTION! FW_MEf V1.65-Error")
write ("F",'Error in line' SIGL ':' ERRORTEXT(RC))
write ("F", 'Please report the author. » age@thepentagon.com «')
Close ("F")
EXIT
BREAK_C:
Call WH
'ShowMessage 1 1 "You have cancelled..." "© Heiko Schröder" "http://yi.com/home/SchroederHeiko" "Okay" "" ""'
EXIT
WH:
If ba=2 then do
View Zoom
GoToPage Sei
End
If Punkt="Comma" then DocItemPrefs DECIMAL Comma
Return
Zaehlen:
If ID~=Objekt.1 then do
nr=nr+1
Objekt.0=nr; Objekt.nr=ID
End
Return
oops:
'ShowMessage 1 1 "Input error!" "" "" "Okay" "" ""'
return
oops1:
'ShowMessage 1 1 "Input error!" "Please use (.) instead (,)!" "" "Okay" "" ""'
return